package com.mipo.client.javase.j2se.json;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

public class Main {
	public static void main(String[] args) {
		//http://cloud.lnjzedu.gov.cn/App.ESchool_zhongxin/api.php?method=class.top.get
		String resultJson = "[{'classId':'5690562229000000018','iconUrl':null,'iconContextId':null},{'classId':'5690562229000000019','iconUrl':'http:\\/\\/download.cloud.lnjzedu.gov.cn\\/rrt_jinzhou\\/2018\\/02\\/28\\/tmp_mang_151981405191854.jpg','iconContextId':'5a9685a5bccbd0628de5e8d5'},{'classId':'5690562229000000001','iconUrl':null,'iconContextId':null}]";
		JSONArray classIds = JSON.parseArray(resultJson);
		
		if (classIds.size() > 0) {
			for (int i = 0; i < classIds.size(); i++) {
				JSONObject object = (JSONObject) classIds.get(i);
				System.out.println(object);
				
				if (object.getString("classId") != null) {
					System.out.println("aaaaa1:"+object.getString("classId"));
				}
				
				
				
				
				
				
			}
		}
		
		
	}
}
